import { defineConfig } from 'vitepress'

// https://vitepress.dev/reference/site-config
export default defineConfig({
    title: '技术博客',
    description: '分享知识',
    themeConfig: {
        // https://vitepress.dev/reference/default-theme-config
        nav: [
            { text: '首页', link: '/' },
            { text: '思想与认知', link: '/thinking/index' },
            { text: '软件工程', link: '/project/index' },
            { text: '技术篇', link: '/technology/index' },
            { text: '人工智能', link: '/ai/index' },
            { text: 'Harmony OS NEXT', link: '/harmonyos/index' },
            { text: '代码样例集', link: '/samples/index' },
        ],

        sidebar: {
            '/project/': [
                {
                    items: [{ text: '软件工程', link: '/project/index' }],
                },
            ],
            '/technology/': [
                {
                    text: '基础篇',
                    items: [
                        {
                            text: '计算机图像',
                            link: '/technology/graphics/index',
                        },
                        // { text: 'PNPM 工具', link: '/technology/pnpm/index' },
                        // { text: 'NPM 工具', link: '/technology/npm' },
                    ],
                },
                {
                    text: '技术篇',
                    items: [
                        {
                            text: 'Vue3打包构建从webpack改为vite',
                            link: '/technology/index',
                        },
                        { text: 'PNPM 工具', link: '/technology/pnpm/index' },
                        { text: 'NPM 工具', link: '/technology/npm' },
                        {
                            text: 'Vue3&Vite集成TypeScript',
                            link: '/technology/Vue3&Vite集成TypeScript',
                        },
                        {
                            text: 'VitePress搭建知识库',
                            link: '/technology/VitePress搭建知识库',
                        },
                        {
                            text: 'Vue3集成ESLint&Prettier',
                            link: '/technology/Vue3&ESlint&Prettier',
                        },
                        { text: 'Nginx', link: '/technology/nginx' },
                    ],
                },
                {
                    text: 'TypeScript',
                    items: [
                        {
                            text: '模块&命名空间',
                            link: '/technology/typescript/index',
                        },
                    ],
                },
            ],
            '/ai/': [
                {
                    text: '人工智能',
                    items: [
                        { text: '名词术语', link: '/ai/index' },
                        { text: '书籍推荐', link: '/ai/books' },
                    ],
                },
            ],
            '/samples/': [
                {
                    items: [{ text: 'HTML', link: '/samples/index' }],
                },
            ],
            '/harmonyos/': [
                {
                    items: [
                        { text: 'Harmony OS NEXT', link: '/harmonyos/index' },
                    ],
                },
            ],
            '/thinking/': [
                {
                    items: [{ text: '思想与认知', link: '/thinking/index' }],
                },
            ],
        },
        socialLinks: [
            { icon: 'github', link: 'https://github.com/vuejs/vitepress' },
        ],
    },
    srcDir: 'src',
    outDir: 'dist',
    // Vite 配置选项
    vite: {
        server: {
            port: 3001,
        },
    },
})
